package com.genesis.yunnanji.view;

import android.view.View;

import com.genesis.yunnanji.Constants;

import com.genesis.yunnanji.R;
import com.genesis.yunnanji.bean.MessageEventBean;

import org.bining.footstone.utils.SharedUtils;
import org.greenrobot.eventbus.EventBus;

import butterknife.OnClick;

/**
 * 创建日期：2018/9/21 on 9:33
 * 作者:Kite
 * 描述:设置
 */
public class SettingActivity extends BaseActivity {

    @Override
    public int getLayoutId() {
        return R.layout.activity_setting;
    }

    @Override
    public void initView() {
        super.initView();
        setTitle("设置");
    }

    @OnClick({R.id.user_setting, R.id.iv_message_switch, R.id.share_app, R.id.login_out})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.user_setting:
                advance(UserSettingActivity.class);
                break;
            case R.id.iv_message_switch:
                break;
            case R.id.share_app:
                break;
            case R.id.login_out:
                SharedUtils.put(Constants.USERISLOGIN, false);
                SharedUtils.put(Constants.USER_TOKEN, "");
                advance(HomePageActivity.class);
                EventBus.getDefault().post(new MessageEventBean(false));
                break;
        }
    }
}
